package com.wqiuqiu.gulimall.ware.dao;

import com.wqiuqiu.common.to.es.HasWareTo;
import com.wqiuqiu.gulimall.ware.entity.WareSkuEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品库存
 *
 * @author wqiuqiu
 * @email 18773489795@163.com
 * @date 2023-11-29 12:16:31
 */
@Mapper
public interface WareSkuDao extends BaseMapper<WareSkuEntity> {

    void updateWareBatch(@Param("wareSkuEntities") List<WareSkuEntity> wareSkuEntities);

    Long getWarebySkuId(@Param("skuId") Long skuId);

    Long lockOrder(@Param("skuId") Long skuId, @Param("count") Integer count, @Param("ware") Long ware);
}
